/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 言初
 * Date: 2023-03-10
 * Time: 12:40
 */
public class Test {
    public static void main(String[] args) {
        Rectangle rectangle=new Rectangle(3,4,1,6);
        System.out.println(rectangle.getArea());
        System.out.println(rectangle.getCincum());
        //得到3个坐标看看对不对.也方便画图计算面积和周长
        System.out.println(rectangle.getLeftFloor().getX()+" "+rectangle.getLeftFloor().getY());
        System.out.println(rectangle.getLeftTop().getX()+" "+rectangle.getLeftTop().getY());
        System.out.println(rectangle.getRightFloor().getX()+" "+rectangle.getRightFloor().getY());
        System.out.println(rectangle.getRightTop().getX()+" "+rectangle.getRightTop().getY());


        Point p1=new Point(3,4);
        Point p2=new Point(1,6);
        Rectangle rectangle1=new Rectangle(p1,p2);
        System.out.println(rectangle1.getArea());
        System.out.println(rectangle1.getCincum());
        //得到3个坐标看看对不对.也方便画图计算面积和周长
        System.out.println(rectangle1.getLeftFloor().getX()+" "+rectangle1.getLeftFloor().getY());
        System.out.println(rectangle1.getLeftTop().getX()+" "+rectangle1.getLeftTop().getY());
        System.out.println(rectangle1.getRightFloor().getX()+" "+rectangle1.getRightFloor().getY());
        System.out.println(rectangle1.getRightTop().getX()+" "+rectangle1.getRightTop().getY());
    }
}
